package com.erb.task;

import com.erb.service.zwj.IAdminRedpacketService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class AdminRedpacketTimer {
	@Resource
	private IAdminRedpacketService adminRedpacketService;

	/**
	 * 为已无效的红包更改状态
	 */
	@Scheduled(cron = "0 0/1 * * * ?")
	public void modifyStateForInvalid() {
		adminRedpacketService.checkStateForEndTime();
	}
}
